package com.ithuaxin.method;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        int []arr = {11,22,100,44,55};
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int a = sc.nextInt();
        boolean flag = exist(arr,a);
        System.out.println(flag);
    }
    public static boolean exist(int arr[],int a){
        boolean exist = false;
        for (int i=0;i<arr.length;i++){
            if (a==arr[i]){
                exist = true;
            }
        }
        return exist;
    }
}
